package com.Blog.www.po;

import java.util.Objects;

/*用户博客实体类,用账号来记录博客,status代表文章的状态*/
public class UserBlog {

    private int uid;
    private String title;
    private String content;
    private String status;
    private int id;

    @Override
    public String toString() {
        return "UserBlog{" +
                "useraccount=" + uid +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", status='" + status + '\'' +
                '}';
    }

    public UserBlog() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserBlog userBlog = (UserBlog) o;
        return uid == userBlog.uid && Objects.equals(title, userBlog.title) && Objects.equals(content, userBlog.content) && Objects.equals(status, userBlog.status);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uid, title, content, status);
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
